[Previous] [Next] [Index] [Thread]

Re: Compiling CERN httpd with static libs on Sol 2.4



In message <9507261406.AA14304@oxygen.house.gov>you write:
>Has anyone successfully compiled the CERN httpd release to use
>static libs?  I'm using gcc on Solaris 2.4.  The -Bstatic isn't
>understood by gcc, but -static should be, if the man pages are
>right.  But it doesn't seem to work.

Don't link statically on Solaris 2.x; the name services switch stuff
in libc dynamically loads the appropriate library according to the contents
of /etc/nsswitch.conf, and if you try to statically link, the dynamic loading
routines (dlopen etc.) will be missing.  You can stub them out, but then
you lose all name resolution capability (gethostbyname etc.), which isn't
ideal for something like httpd.

Regards,

John
--
John DiMarco <jdd@cdf.toronto.edu>                        Office: EA201B
Computing Disciplines Facility Systems Manager            Phone: 416-978-1928
University of Toronto                                     Fax:   416-978-1931
http://www.cdf.toronto.edu/personal/jdd/jdd.htm


References: